import { BaseDeployPanel } from "./BaseDeployPanel";
import { Language } from "../../../../../../extend/language/Language";
import { Cache } from "../../../../cache/Cache";
import { MsgManager } from "../../../../manager/MsgManager";
import { ShopConfig } from "../../../../resource/ShopConfig";
import { Dispatcher } from "../../../../../mvc/core/Dispatcher";
import { DataEvent } from "../../../../events/DataEvent";
import { EventName } from "../../../../mvc/EventName";
import { EquipmentModuleConst } from "../../data/EquipmentModuleConst";
import { NetDispatcher } from "../../../../../mvc/core/NetDispatcher";
import { ServerCommand } from "../../../../mvc/ServerCommand";
import { EquipUpdateParams } from "../../data/EquipUpdateParams";
import { ECategory } from "../../../../../../Message/Public/ECategory";
import { EProp } from "../../../../../../Message/Public/EProp";
import { EColor } from "../../../../../../Message/Public/EColor";
import { EBind } from "../../../../../../Message/Public/EBind";
import { GameDefConfig } from "../../../../resource/GameDefConfig";
import { EJewel } from "../../../../../../Message/Public/EJewel";
import { EquipAdvanceConfig } from "../../../../resource/EquipAdvanceConfig";
import { ItemData } from "../../../../resource/info/ItemData";
import { EquipmentItemDataUtil } from "../../../common/EquipmentItemDataUtil";
import { EItemUpdateOper } from "../../../../../../Message/Game/EItemUpdateOper";
import { GModuleEvent } from "../../../../mvc/GModuleEvent";
import { EItemUpdateResult } from "../../../../../../Message/Game/EItemUpdateResult";
import { GImageBitmap } from "../../../../../../com/mui/controls/GImageBitmap";
import { DeployPanelItem } from "../DeployPanelItem";
import { ExAttributePanel } from "../ExAttributePanel";
import { GlobalClass } from "../../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../../resource/ImagesConst";
import { FilterConst } from "../../../../../component/gconst/FilterConst";
import { ObjCreate } from "../../../common/ObjCreate";
import { TItemWeapon } from "../../../../../../Message/Db/Tables/TItemWeapon";
import { EEquipRefreshOperType } from "../../../../../../Message/Game/EEquipRefreshOperType";
import { Alert } from "../../../../../../com/mui/controls/Alert";
import { CheckBoxWin } from "../../../common/alertwins/CheckBoxWin";
import { GLabel } from "../../../../../../com/mui/controls/GLabel";
import { GButton } from "../../../../../../com/mui/controls/GButton";
import { EquipRefreshInfo } from "../../../../resource/info/EquipRefreshInfo";
import { _EJewelLife } from "../../../../../../EJewel/_EJewelLife";
import { _EJewelMana } from "../../../../../../EJewel/_EJewelMana";
import { _EJewelPower } from "../../../../../../EJewel/_EJewelPower";
import { _EJewelAgile } from "../../../../../../EJewel/_EJewelAgile";
import { _EJewelHabitus } from "../../../../../../EJewel/_EJewelHabitus";
import { _EJewelBrains } from "../../../../../../EJewel/_EJewelBrains";
import { _EJewelSpiritual } from "../../../../../../EJewel/_EJewelSpiritual";
import { _EJewelHit } from "../../../../../../EJewel/_EJewelHit";
import { _EJewelJouk } from "../../../../../../EJewel/_EJewelJouk";
import { _EJewelPass } from "../../../../../../EJewel/_EJewelPass";
import { _EJewelBlock } from "../../../../../../EJewel/_EJewelBlock";
import { _EJewelSpeededUp } from "../../../../../../EJewel/_EJewelSpeededUp";
import { _EJewelToughness } from "../../../../../../EJewel/_EJewelToughness";
import { _EJewelRelief } from "../../../../../../EJewel/_EJewelRelief";
import { _EJewelPhysicalAttack } from "../../../../../../EJewel/_EJewelPhysicalAttack";
import { _EJewelMagicAttack } from "../../../../../../EJewel/_EJewelMagicAttack";
import { _EJewelPhysicalDefense } from "../../../../../../EJewel/_EJewelPhysicalDefense";
import { _EJewelMagicDefense } from "../../../../../../EJewel/_EJewelMagicDefense";
import { _EJewelPhysicalCrit } from "../../../../../../EJewel/_EJewelPhysicalCrit";
import { _EJewelMagicCrit } from "../../../../../../EJewel/_EJewelMagicCrit";
type int = number;
//class RecastPanel
    
    export  class RecastPanel extends BaseDeployPanel
    {
        constructor()
        {
            this._useLocks = [];
            this.posData = [{"x": 118, "y": 100, "label": Language.getString(60230), "canRemove": true, "noBoarder": false}, {"x": 204, "y": 100, "label": Language.getString(60231), "canRemove": false, "noBoarder": true}, {"x": 45, "y": 80, "label":"", "canRemove": false, "noBoarder": false}, {"x": 254, "y": 100, "label": Language.getString(60231), "canRemove": false, "noBoarder": true}];
            this.buttonLabel = Language.getString(60232);
            this._alarmText = Language.getString(60147);
            super();
            return;
        }

        /* internal  */isCanRefresh(): Boolean
        {
            var loc1=null;
            var loc2=0;
            var loc3=0;
            var loc4=null;
            if (allItem[1].enabled == false) 
            {
                if (allItem[1].itemData) 
                {
                    if (Cache.instance.equipment.isAutoBuy) 
                    {
                        return true;
                    }
                    MsgManager.showRollTipsMsg(Language.getStringByParam(60226, allItem[1].itemData.name));
                }
                else 
                {
                    MsgManager.showRollTipsMsg(Language.getString(60235));
                }
                return false;
            }
            if (allItem[3].enabled == false) 
            {
                if (allItem[3].itemData) 
                {
                    if (Cache.instance.equipment.isAutoBuy) 
                    {
                        loc1 = ShopConfig.instance.getShopItemInfoByCode(allItem[3].itemData.itemCode);
                        var loc5=0;
                        var loc6=this._useLocks;
                        for(loc4 of loc6) 
                        {
                            loc2 = loc2 + loc4.itemAmount;
                        }
                        loc3 = allItem[3].amount - loc2;
                        Dispatcher.dispatchEvent(new DataEvent(EventName.ShopMallBuyItem, {"shopItemInfo": loc1, "amount": loc3, "callBack": this.onItemBuySuccess}));
                    }
                    else 
                    {
                        MsgManager.showRollTipsMsg(Language.getStringByParam(60226, allItem[3].itemData.name));
                    }
                }
                else 
                {
                    MsgManager.showRollTipsMsg(Language.getString(60236));
                }
                return false;
            }
            if (!isEnoughMoney) 
            {
                this.dispatchEvent(new DataEvent(EquipmentModuleConst.Event_CoinNotEnough, null, false, true, true));
                MsgManager.showRollTipsMsg(Language.getString(60121));
                return false;
            }
            return true;
        }

        /* internal  */onItemBuySuccess(): void
        {
            NetDispatcher.addCmdListener(ServerCommand.BackPackItemsChange, this.serverBagDataChangehandler);
            return;
        }

        /* internal  */serverBagDataChangehandler(arg1): void
        {
            NetDispatcher.removeCmdListener(ServerCommand.BackPackItemsChange, this.serverBagDataChangehandler);
            this.dispatchEvent(new DataEvent(EquipmentModuleConst.Event_ChoosedEquimentChange, [allItem[0].itemData], false, true));
            this.onButtonClickImpl(confirmButton);
            return;
        }

        /* internal  */onConfirm(): void
        {
            var loc7=null;
            var loc8=null;
            var loc1=this.currentEquipmentData.posType;
            var loc2=allItem[0].itemData.uid;
            var loc3=allItem[1].itemData ? allItem[1].itemData.uid : "";
            var loc4=this._currentExAttriPanel.lockNum > 0 ? true : false;
            var loc5=this._currentExAttriPanel.lockPosDic;
            var loc6=[];
            if (!(loc3 == "") && !(loc3 == null)) 
            {
                loc6.push(loc3);
            }
            var loc9=0;
            var loc10=this._useLocks;
            for(loc7 of loc10) 
            {
                loc6.push(loc7.uid);
            }
            (loc8 = new EquipUpdateParams()).operationId = this.operationId;
            loc8.autoUpdate = false;
            loc8.equipPosType = loc1;
            loc8.equipUid = loc2;
            loc8.materialUid = loc3;
            loc8.operType = this._operType.value();
            loc8.flag = loc4;
            loc8.lockPos = loc5;
            loc8.materials = loc6;
            loc8.autoBuyLock = Cache.instance.equipment.isAutoBuy;
            if (allItem[1].itemData && allItem[1].itemData.category == ECategory._ECategoryProp && allItem[1].itemData.type == EProp._EPropRefresh && allItem[1].itemData.color >= EColor._EColorRed) 
            {
                loc8.autoBuyTone = false;
            }
            else 
            {
                loc8.autoBuyTone = Cache.instance.equipment.isAutoBuy;
            }
            this.dispatchEvent(new DataEvent(EquipmentModuleConst.Event_DoUpdateEvent1, loc8, false, true));
            return;
        }

        /* internal  */checkIsChangeToBind(): Boolean
        {
            if (!(allItem[0].itemData.itemExInfo.bind == EBind._EBindYes) && (allItem[1].itemData.itemInfo.item.bind == EBind._EBindYes || allItem[3].itemData && allItem[3].itemData.itemInfo.item.bind == EBind._EBindYes)) 
            {
                return true;
            }
            return false;
        }

        /* internal  */getHighAttribute(): Object
        {
            var loc2=null;
            var loc3=null;
            var loc4=null;
            var loc5=0;
            var loc6=0;
            var loc7=0;
            var loc8=0;
            var loc9=null;
            var loc10=null;
            if (!allItem[0].itemData) 
            {
                return null;
            }
            var loc1=allItem[0].itemData.itemExInfo;
            if (loc1) 
            {
                loc2 = loc1.refDict && loc1.refDict.length > 0 ? loc1.refDict[0] : null;
                loc3 = (loc1.ref_lock as string).split(",");
                loc8 = 0;
                while (loc8 < 6) 
                {
                    if (loc2 && loc8 < loc2.length) 
                    {
                        loc5 = (loc4 = loc2[loc8])[0];
                        loc6 = loc4[1];
                        loc7 = loc4[2];
                        if (loc8 >= (loc3.length - 1) && loc6 >= 8 && this.isGoodAddition(loc5)) 
                        {
                            loc10 = (loc9 = GameDefConfig.instance.getEJewel(loc5)) ? loc9.name : "";
                            return {"add": loc5, "value": loc7, "star": loc6, "name": loc10};
                        }
                    }
                    ++loc8;
                }
            }
            return null;
        }

        /* internal  */isGoodAddition(arg1: int): Boolean
        {
            var loc1=arg1;
            switch (loc1) 
            {
                case EJewel._EJewelPhysicalAttack: case EJewel._EJewelMagicAttack: case EJewel._EJewelLife:
                {
                    return true;
                }
            }
            return false;
        }

        protected /* override */ updateStatus(): void
        {
            var loc2=null;
            var loc1=0;
            if (this.currentEquipmentData) 
            {
                this.updateConfigInfo = EquipAdvanceConfig.instance.getRefreshConfigInfo(this.currentEquipmentData.itemInfo.item.color);
                loc1 = this.updateConfigInfo ? this.updateConfigInfo.cost : 0;
                loc2 = this.currentEquipmentData.itemInfo.extend;
                if (!this.currentEquipmentData.itemExInfo.refDict || this.currentEquipmentData.itemExInfo.refDict.length == 0) 
                {
                    this._replaceBtn.enabled = false;
                }
                else 
                {
                    this._replaceBtn.enabled = true;
                }
            }
            else 
            {
                loc1 = 0;
                allItem[2].itemData = null;
                this.setAttribute();
                confirmButton.enabled = true;
                this._replaceBtn.enabled = true;
            }
            if (allItem[3].itemData) 
            {
                allItem[3].visible = true;
            }
            else 
            {
                allItem[3].visible = false;
            }
            this._currentExAttriPanel.sortLabels();
            if (_cost != loc1) 
            {
                _cost = loc1;
                dispatchEvent(new DataEvent(EquipmentModuleConst.Event_CostChange, _cost, false, true));
            }
            return;
        }

        public /* override */ putInItem(arg1: ItemData, arg2: Boolean=false, arg3=null): void
        {
            if (arg1.itemInfo.item.category == ECategory._ECategoryEquip || arg1.itemInfo.item.category == ECategory._ECategoryPetEquip) 
            {
                this.currentEquipmentData = arg1;
                this.equipUtil = new EquipmentItemDataUtil(arg1);
                allItem[0].itemData = arg1;
                allItem[2].itemData = this.equipUtil.getHighestEquip(EItemUpdateOper._EItemUpdateOperRecast);
                this.setAttribute();
                this.updateStatus();
                this.dispatchEvent(new DataEvent(EquipmentModuleConst.Event_ChoosedEquimentChange, [this.currentEquipmentData], false, true));
                this.dispatchEvent(new DataEvent(EquipmentModuleConst.Event_RecastLockNumChange, this._currentExAttriPanel.lockNum, false, true));
                this.dispatchEvent(new DataEvent(GModuleEvent.Event_UpdateBatchRecastEquip, allItem[0].itemData, false, true, true));
            }
            return;
        }

        public moveOutByIndex(arg1: int): void
        {
            if (arg1 >= 0 && arg1 < 2) 
            {
                if (arg1 != 0) 
                {
                    allItem[arg1].itemData = null;
                    this.updateStatus();
                }
                else 
                {
                    this.clear();
                    allItem[2].itemData = null;
                }
            }
            return;
        }

        public moveOutByUid(arg1: string): void
        {
            var loc2=null;
            var loc1=0;
            while (loc1 < 2) 
            {
                loc2 = allItem[loc1 + 1].itemData;
                if (loc2 && loc2.uid == arg1) 
                {
                    this.moveOutByIndex(loc1);
                    break;
                }
                ++loc1;
            }
            return;
        }

        public /* override */ clear(): void
        {
            clearAllItem();
            this.currentEquipmentData = null;
            this.equipUtil = null;
            this._useLocks = [];
            this.updateStatus();
            this.dispatchEvent(new DataEvent(EquipmentModuleConst.Event_ChoosedEquimentChange, [], false, true));
            return;
        }

        public /* override */ setAutoChooseMaterial(arg1: Object): void
        {
            var loc2=null;
            var loc3=false;
            var loc4=0;
            var loc1=arg1.material as Array<any>;
            var loc5=0;
            while (loc5 < loc1.length) 
            {
                loc2 = loc1[loc5]["data"];
                loc3 = loc1[loc5]["isEnough"];
                loc4 = loc1[loc5]["amount"];
                if (loc2.type == EProp._EPropRefresh || loc2.type == EProp._EPropPetEquipRefresh) 
                {
                    allItem[1].itemData = loc2;
                    allItem[1].amount = loc4;
                    allItem[1].enabled = loc3;
                }
                else if (loc2.type == EProp._EPropRefreshLock) 
                {
                    this._useLocks = arg1.useLocks as Array<any>;
                    if (loc4 > 0) 
                    {
                        allItem[3].itemData = loc2;
                        allItem[3].amount = loc4;
                        allItem[3].enabled = loc3;
                    }
                    else 
                    {
                        allItem[3].itemData = null;
                        allItem[3].enabled = true;
                    }
                }
                ++loc5;
            }
            this.updateStatus();
            return;
        }

        public /* override */ onUpdateResult(arg1: int, arg2: Boolean, arg3, arg4: Array<any>): void
        {
            if (arg1 != EItemUpdateResult._EItemUpdateResultSuccess) 
            {
                MsgManager.showRollTipsMsg(Language.getString(60238));
                this.clear();
            }
            else 
            {
                addUpdateSuccessEffect("equipEffect_recast.swf", 212, 117);
                this.clear();
                MsgManager.showRollTipsMsg(Language.getString(60237));
            }
            this.putInItem(new ItemData(arg3));
            return;
        }

        protected /* override */ createChildren(): void
        {
            var loc5=null;
            var loc6=null;
            super.createChildren();
            var loc1=new GImageBitmap("equipment_recast_recast.png", 160, 100);
            this.addChild(loc1);
            var loc2=new GImageBitmap("Label_jipingyulang.png", 16, 122);
            this.addChild(loc2);
            var loc3=0;
            while (loc3 < this.posData.length) 
            {
                loc5 = this.posData[loc3];
                (loc6 = new DeployPanelItem(loc3, loc5.noBoarder)).posIndex = loc3;
                loc6.x = loc5["x"];
                loc6.y = loc5["y"];
                loc6.label = loc5["label"];
                if (loc5.canRemove) 
                {
                    loc6.mouseEnabled = true;
                    loc6.addEventListener(flash.events.MouseEvent.CLICK, this.onItemClick);
                }
                addChild(loc6);
                allItem.push(loc6);
                ++loc3;
            }
            this._currentExAttriPanel = new ExAttributePanel();
            this._currentExAttriPanel.type = ExAttributePanel.CurrentAttri;
            this._currentExAttriPanel.x = 21;
            this._currentExAttriPanel.y = 152;
            this._currentExAttriPanel.addEventListener(ExAttributePanel.UseLockChange, this.onUseLockChange);
            this.addChild(this._currentExAttriPanel);
            this._newExAttriPanel = new ExAttributePanel();
            this._newExAttriPanel.type = ExAttributePanel.NewAttri;
            this._newExAttriPanel.x = 195;
            this._newExAttriPanel.y = 152;
            this.addChild(this._newExAttriPanel);
            var loc4;
            (loc4 = GlobalClass.getBitmap(ImagesConst.EquipRecast_arrow)).x = 156;
            loc4.y = 215;
            this.addChild(loc4);
            confirmButton.label = this.buttonLabel;
            confirmButton.x = 65;
            confirmButton.y = 307;
            confirmButton.textField.filters = [FilterConst.glowFilter];
            confirmButton.styleName = "ButtonSpecial";
            addChild(confirmButton);
            confirmButton.addEventListener(flash.events.MouseEvent.CLICK, this.onButtonClick);
            this._replaceBtn = ObjCreate.createGButton(Language.getString(60233), 145, 307, 68, 26, this, "ButtonSpecial");
            this._replaceBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onButtonClick);
            this._batchRefreshBtn = ObjCreate.createGButton(Language.getString(61075), 225, 307, 68, 26, this, "ButtonSpecial");
            this._batchRefreshBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onButtonClick);
            return;
        }

        /* internal  */setAttribute(): void
        {
            this._currentExAttriPanel.setAttributes(this.equipUtil);
            this._newExAttriPanel.setAttributes(this.equipUtil);
            return;
        }

        /* internal  */onUseLockChange(arg1: Object /* flash.events.Event */=null): void
        {
            this.updateStatus();
            this.dispatchEvent(new DataEvent(EquipmentModuleConst.Event_RecastLockNumChange, this._currentExAttriPanel.lockNum, false, true));
            return;
        }

        public setLockPos(arg1: Map<any, any> /* flash.utils.Dictionary */): void
        {
            this._currentExAttriPanel.lockPosDic = arg1;
            this.onUseLockChange();
            return;
        }

        /* internal  */getAdditionArray(): Array<any>
        {
            var loc1=this.currentEquipmentData.itemInfo.extend as TItemWeapon;
            var loc2=new Array<any>();
            if (loc1.life > 0) 
            {
                loc2.push({"type": _EJewelLife, "value": loc1.life});
            }
            if (loc1.mana > 0) 
            {
                loc2.push({"type": _EJewelMana, "value": loc1.mana});
            }
            if (loc1.power > 0) 
            {
                loc2.push({"type": _EJewelPower, "value": loc1.power});
            }
            if (loc1.agile > 0) 
            {
                loc2.push({"type": _EJewelAgile, "value": loc1.agile});
            }
            if (loc1.habitus > 0) 
            {
                loc2.push({"type": _EJewelHabitus, "value": loc1.habitus});
            }
            if (loc1.brains > 0) 
            {
                loc2.push({"type": _EJewelBrains, "value": loc1.brains});
            }
            if (loc1.spiritual > 0) 
            {
                loc2.push({"type": _EJewelSpiritual, "value": loc1.spiritual});
            }
            if (loc1.hit > 0) 
            {
                loc2.push({"type": _EJewelHit, "value": loc1.hit});
            }
            if (loc1.jouk > 0) 
            {
                loc2.push({"type": _EJewelJouk, "value": loc1.jouk});
            }
            if (loc1.pass > 0) 
            {
                loc2.push({"type": _EJewelPass, "value": loc1.pass});
            }
            if (loc1.block > 0) 
            {
                loc2.push({"type": _EJewelBlock, "value": loc1.block});
            }
            if (loc1.speededUp > 0) 
            {
                loc2.push({"type": _EJewelSpeededUp, "value": loc1.speededUp});
            }
            if (loc1.toughness > 0) 
            {
                loc2.push({"type": _EJewelToughness, "value": loc1.toughness});
            }
            if (loc1.relief > 0) 
            {
                loc2.push({"type": _EJewelRelief, "value": loc1.relief});
            }
            if (loc1.physicalAttack > 0) 
            {
                loc2.push({"type": _EJewelPhysicalAttack, "value": loc1.physicalAttack});
            }
            if (loc1.magicAttack > 0) 
            {
                loc2.push({"type": _EJewelMagicAttack, "value": loc1.magicAttack});
            }
            if (loc1.physicalDefense > 0) 
            {
                loc2.push({"type": _EJewelPhysicalDefense, "value": loc1.physicalDefense});
            }
            if (loc1.magicDefense > 0) 
            {
                loc2.push({"type": _EJewelMagicDefense, "value": loc1.magicDefense});
            }
            if (loc1.physicalCrit > 0) 
            {
                loc2.push({"type": _EJewelPhysicalCrit, "value": loc1.physicalCrit});
            }
            if (loc1.magicCrit > 0) 
            {
                loc2.push({"type": _EJewelMagicCrit, "value": loc1.magicCrit});
            }
            return loc2;
        }

        /* internal  */checkHasThisAttribute(arg1: int): Boolean
        {
            var loc1=this.currentEquipmentData.itemExInfo;
            if (loc1.addition1 == arg1) 
            {
                return true;
            }
            if (loc1.addition2 == arg1) 
            {
                return true;
            }
            if (loc1.addition3 == arg1) 
            {
                return true;
            }
            if (loc1.addition4 == arg1) 
            {
                return true;
            }
            if (loc1.addition5 == arg1) 
            {
                return true;
            }
            if (loc1.addition6 == arg1) 
            {
                return true;
            }
            return false;
        }

        /* internal  */onItemClick(arg1: Object /* flash.events.MouseEvent */): void
        {
            var loc1=arg1.currentTarget as DeployPanelItem;
            this.moveOutByIndex(loc1.posIndex);
            return;
        }

        /* internal  */onButtonClick(arg1: Object /* flash.events.MouseEvent */): void
        {
            this.onButtonClickImpl(arg1.currentTarget);
            return;
        }

        /* internal  */onButtonClickImpl(arg1): void
        {
            var loc1=null;
            var loc2=null;
            if (allItem[0].itemData == null) 
            {
                MsgManager.showRollTipsMsg(Language.getString(60234));
                return;
            }
            var loc3=arg1;
            switch (loc3) 
            {
                case confirmButton:
                {
                    if (!this.isCanRefresh()) 
                    {
                        return;
                    }
                    this._operType = EEquipRefreshOperType.convert(EEquipRefreshOperType._EEquipRefreshNormal);
                    if (this.checkIsChangeToBind()) 
                    {
                        loc1 = this._alarmText;
                        Alert.show(loc1, null, Alert.OK | Alert.CANCEL, null, this.closeConfirmAlertHandler);
                    }
                    else 
                    {
                        loc2 = this.getHighAttribute();
                        if (loc2 && !Cache.instance.equipment.isCurRecastNoTips) 
                        {
                            loc1 = Language.getStringByParam(61033, loc2["name"] + "+" + loc2["value"], "" + loc2["star"]);
                            Alert.alertWinRenderer = CheckBoxWin;
                            Alert.checkBoxLabel = Language.getString(61034);
                            Alert.show(loc1, null, Alert.OK | Alert.CANCEL, null, this.closeConfirmAlertHandler);
                        }
                        else 
                        {
                            this.onConfirm();
                        }
                    }
                    break;
                }
                case this._replaceBtn:
                {
                    this._operType = EEquipRefreshOperType.convert(EEquipRefreshOperType._EEquipRefreshReplace);
                    this.onConfirm();
                    break;
                }
                case this._batchRefreshBtn:
                {
                    this.dispatchEvent(new DataEvent(GModuleEvent.Event_OpenBatchRecastWin, {"equip": allItem[0].itemData, "lockDic": this._currentExAttriPanel.lockPosDic}, false, true, true));
                    break;
                }
            }
            return;
        }

        /* internal  */closeConfirmAlertHandler(arg1: int, arg2: Boolean=false): void
        {
            if (arg1 == Alert.OK) 
            {
                this.onConfirm();
            }
            Cache.instance.equipment.isCurRecastNoTips = arg2;
            return;
        }

        /* internal */ /* var */hintItem: GLabel;

        /* internal */ /* var */currentEquipmentData: ItemData;

        /* internal */ /* var */equipUtil: EquipmentItemDataUtil;

        protected /* var */operationId: int=6;

        /* internal */ /* var */_operType: EEquipRefreshOperType;

        /* internal */ /* var */_useLocks: Array<any>;

        /* internal */ /* var */_currentExAttriPanel: ExAttributePanel;

        /* internal */ /* var */_newExAttriPanel: ExAttributePanel;

        /* internal */ /* var */posData: Array<any>;

        /* internal */ /* var */buttonLabel: string;

        /* internal */ /* var */_replaceBtn: GButton;

        /* internal */ /* var */_batchRefreshBtn: GButton;

        /* internal */ /* var */updateConfigInfo: EquipRefreshInfo;

        /* internal */ /* var */_alarmText: string;
    }
